this.iconSize = 64;
this._shownInitially = false;
+ this._separator = null;
this._dragPlaceholder = null;
this._dragPlaceholderPos = -1;
this._animatingPlaceholdersCount = 0;
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
+
+ if (this._separator) {
+ this._separator.ease({
+ height: this.iconSize,
+ duration: DASH_ANIMATION_TIME,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ });
+ }
}
_redisplay() {
for (let i = 0; i < addedItems.length; i++)
addedItems[i].item.show(animate);
+ // Update separator
+ const nFavorites = Object.keys(favorites).length;
+ if (nFavorites > 0) {
+ if (!this._separator) {
+ this._separator = new St.Widget({
+ style_class: 'dash-separator',
+ y_align: Clutter.ActorAlign.CENTER,
+ height: this.iconSize,
+ });
+ this._box.add_child(this._separator);
+ }
+ let pos = nFavorites;
+ if (this._dragPlaceholder)
+ pos++;
+ this._box.set_child_at_index(this._separator, pos);
+ } else if (this._separator) {
+ this._separator.destroy();
+ this._separator = null;
+ }
+
// Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=692744
// Without it, StBoxLayout may use a stale size cache
this._box.queue_relayout();
numChildren--;
}
+ // Same with the separator
+ if (this._separator) {
+ boxWidth -= this._separator.width;
+ numChildren--;
+ }
+
let pos;
if (!this._emptyDropTarget)
pos = Math.floor(x * numChildren / boxWidth);